package router

import (
	"github.com/gin-gonic/gin"
	"go_pure_admin_api/controllers"
)

func DeptRoutes() {
	RegisterRoute(func(rgPublic *gin.RouterGroup, rgAuth *gin.RouterGroup) {
		dept := controllers.DeptController{}
		//rgPublicDept := rgPublic.Group("dept").Use(func() gin.HandlerFunc {
		//	return func(ctx *gin.Context) {
		//		// 这里可以添加user公开的路由中间件
		//	}
		//}())
		//{

		//}

		rgAuthDept := rgAuth.Group("dept")
		{
			rgAuthDept.POST("/deptList", dept.GetDeptList)
			rgAuthDept.POST("/createDept", dept.CreateDept)
			rgAuthDept.POST("/updateDept", dept.UpdateDept)
			rgAuthDept.POST("/deleteDept", dept.DeleteDept)
		}
	})
}
